<?php
if (!defined('IN_XLP')) {
    exit('Access Denied');
}
$Document = array(
    'pageid' => 'news-addone', //页面标示
    'pagename' => '添加单条图文', //当前页面名称
    'mycss' => array('content/appmsg'), //加载的css样式表
    'myjs' => array(), //加载的js脚本
    'footerjs'=>array('content/fuelux/fuelux', 'content/combodate/moment.min', '../ueditor/editor_config', '../ueditor/editor.min', 'content/operamasks-ui.min', 'content/appmsg'),
    'head' => true, //加载头部文件
);

include getTpl('header', 'public');
?>
<!--顶部导航 开始-->
<?php include getTpl('top', 'public');?>
<!--顶部导航 结束-->
<!--左侧菜单 开始-->
<?php include getTpl('nav', 'public');?>
<!--左侧菜单 结束-->
<!--主体 开始-->
<!-- content -->
  <section id="content">
    <section class="main padder"> 
    <div class="clearfix"> 
     <h4><i class="fa fa-edit"></i>添加图文信息</h4> 
    </div> 
    <div class="row"> 
     <div class="col-sm-12"> 
      <section class="panel"> 
       <div class="panel-body"> 
        <!--添加单条图文  b-->
		<form id="appmsg-form" class="form" method="post">		
            <div class="span5 msg-preview" style="width:380px;float:left;">
                <div class="msg-item-wrapper">
                    <div id="appmsgItem1" class="msg-item appmsgItem1">
                      <h4 class="msg-t"><span class="i-title">标题</span></h4>
                      <p class="msg-meta"><span class="msg-date"><script>var myDate = new Date();  document.write(myDate.getFullYear()+"-"+(myDate.getMonth()+1)+"-"+myDate.getDate())</script></span></p>
                      <div class="cover">
                        <p class="default-tip" >封面图片</p>
                        <img class="i-img"  style=""> </div>
                      <p class="msg-text"></p>
                    </div>
                    <div class="msg-hover-mask"></div>
                    <div class="msg-mask"> <span class="dib msg-selected-tip"></span> </div>
                  </div>
                </div>
                <div class="span7" style="width:540px; float:left; margin-left:20px;">
                  <div class="msg-editer-wrapper">
                    <div class="msg-editer">
                        <div class="control-group">
                          <label class="control-label">标题</label>
                          <span class="maroon">*</span><span class="help-inline">(必填,不能超过64个字)</span>
                          <div class="controls">
                            <input type="text" id="title" class="form-control span5" style="width: 482px;" name="title" value=""/>
                          </div>
                        </div>
                        <!-- <div class="control-group">
                            <label class="control-label">分类</label>
                            <div class="controls">
                                <select name="cid" id="cid" class="form-control" style="width: 482px;">
                                  <option value="0">选择文章分类</option>
                                  <?php echo $news_cate; ?>
                                </select>
                            </div>
                        </div> -->
                        <div class="control-group">
                          <label class="control-label">封面</label>
                          <div class="controls">
                            <div class="cover-area">
                              <div class="cover-hd">
                                <input id="file_upload" name="file_upload" type="file" />
                                <input id="coverurl" value="" name="coverurl" type="hidden" />
                              </div>
                              <p id="upload-tip" class="upload-tip">大图：360*200，小图:200*200</p>
                              <p id="upload-progress" style="display:none; margin-left:5px; font-size:12px"></p>
                              <div id="imgArea" class="cover-bd" style="display: none;">
                              	<img src="" id="img" />
                              	<a href="javascript:;" class="vb cover-del" id="delImg">删除</a>
                                <p id="upload-size"></p>
                              </div>
                            </div>
                          </div>
                          <div style="padding:5px 0;">
                                <input type="checkbox" id="isCover" name="isCover" value="1" style="width:15px; height:15px; margin-right:10px; vertical-align:middle;"><span style="vertical-align:middle;" >封面图片显示在正文中</span>
                            </div>
                        </div>
                        <div id="desc-block" class="control-group">
                          <label class="control-label">摘要</label>
                          <span class="help-inline">(不能超过120个字)</span>
                          <div class="controls">
                            <textarea name="summary" id="summary" class="msg-txta" style="height:90px"></textarea>
                          </div>
                        </div>
                        <div class="control-group">
                          <label class="control-label">正文</label>
                          <span class="maroon"></span><span class="help-inline">(不能超过20000个字)</span>
                          <div class="controls"> 
                            <script type="text/plain" id="editor"></script> 
                          </div>
                        </div>
                        <a id="url-block-link" href="javascript:void(0);" class="url-link block">添加来源</a>
                        <div id="url-block" style="display:none" class="control-group">
                          <label class="control-label">来源</label>
                          <span class="help-inline">(请输入正确的URL链接格式)</span>
                          <div class="controls">
                            <input type="text" id="source_url" class="form-control span5" style="width: 482px;" name="source_url" value="" />
                          </div>
                        </div>
                        <div class="control-group">
                          <label class="control-label">排序值</label>
                          <span class="help-inline">数值越大越靠前（0-999）</span>
                          <div class="controls">
                            <input type="text" id="px" class="form-control span2" style="width:80px;" name="px" value="0" />
                          </div>
                        </div>
                        <div class="control-group">
                          <div class="controls">
                            <button id="save-btn" type="submit" class="btn btn-primary btn-large">保存</button>
                            <button id="cancel-btn" type="button" class="btn btn-large">取消</button>
                          </div>
                        </div>
                        <input name="tid" id="tid" type="hidden" value="<?php echo $tid;?>">
                        <input name="id" id="id" type="hidden" value="0">
                        <input id="action" type="hidden" value="add" />
                    </div>
                    <span class="abs msg-arrow a-out" style="margin-top: 0px;"></span> <span class="abs msg-arrow a-in" style="margin-top: 0px;"></span> </div>
                </div>
                <div class="clear"></div>
                </form>
            <!--添加单条图文  E-->
       </div> 
      </section>
     </div> 
    </div> 
   </section>
  </section> 
  <!--/ content --> 
<!--主体 结束-->
<script>
var UEDITOR_HOME_URL = '<?php echo LOCAL_PUBLIC_PATH;?>ueditor/';
var fixedImagePath='';
var gotoUrl='<?php echo U('news/index',array('tid'=>$tid));?>';
var postUrl='<?php echo U('news/post');?>';
var postPicUrl='<?php echo U('news/postpic');?>';
var uploadUrl='<?php echo U('news/upload');?>';
function ueditorUploadCallBack(data){
	console.log(data);
}
</script>
<?php
include getTpl('footer', 'public');
?>